package detect.parse.tree.token;

import java.util.List;


public class Token extends PositionString {
	
//	public static int UNKNOWN_TYPE=0;
//	public static int NUMBER_TYPE=1;
//	public static int NAME_TYPE=2;
//	public static int TYPE_TYPE=3;
//	public static int EQUAL_TYPE=4;
//	public static int NON_EQUAL_TYPE=5;
//	public static int LEFT_BRACE_TYPE=6;
//	public static int RIGHT_BRACE_TYPE=7;
	
	public static String[] reservedWords=new String[]{
		"if",
		"while",
		"for",
		"return",
		"else",		
	};
	
	public static RawTokenType[] reservedWordsType=new RawTokenType[]{
		RawTokenType.IF,
		RawTokenType.WHILE,
		RawTokenType.FOR,		
		RawTokenType.RETURN,
		RawTokenType.ELSE
	};
	
	
	
	public static String[] punctuations=new String[]{
		",",
		";",
		"=",
		"(",
		")",
		"{",
		"}",
		"[",
		"]"
	};
	
	public static RawTokenType[] punctuationsType=new RawTokenType[]{
		RawTokenType.COMMA,
		RawTokenType.SEMI,
		RawTokenType.EQ,
		RawTokenType.LPAREN,
		RawTokenType.RPAREN,
		RawTokenType.LBRACE,
		RawTokenType.RBRACE,
		RawTokenType.LBRACKET,
		RawTokenType.RBRACKET
	};
	
	public static char UNKNOWN_TYPE_CHAR='0';
	public static char NUMBER_TYPE_CHAR='n';
	public static char NAME_TYPE_CHAR='v';
	public static char TYPE_TYPE_CHAR='t';
	public static char EQUAL_TYPE_CHAR='=';
	public static char NON_EQUAL_TYPE_CHAR='>';
	public static char LEFT_BRACE_TYPE_CHAR='(';
	public static char RIGHT_BRACE_TYPE_CHAR=')';
	
	public TokenType type=TokenType.UNKNOWN;
	public RawTokenType rawType=RawTokenType.UNKNOWN;
	public Token(String _str, int _beginPosition) {
		super(_str, _beginPosition);
		// TODO Auto-generated constructor stub
	}
	
	public void setTokenType(TokenType _type){
		type=_type;
		rawType=type.rawType;
	}
	
	@Override
	public String toString(){
		return str;
	}
	
	
	
	
}
